﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using DTO;
namespace BUS
{
    public class THANHPHO_BUS
    {
        public static bool ThemThanhPho (THANHPHO_DTO tp)
        {
            return THANHPHO_DAO.ThemThanhPho(tp);
        }
        public static bool SuaThanhPho(THANHPHO_DTO tp)
        {
            return THANHPHO_DAO.SuaThanhPho(tp);
        }
        public static bool XoaThanhPho(int maTP)
        {
            return THANHPHO_DAO.XoaThanhPho(maTP);
        }
        public static List<THANHPHO_DTO> SelectThanhPhosAll()
        {
            return THANHPHO_DAO.SelectThanhPhosAll();
        }

        public static THANHPHO_DTO SelectThanhPhosByAndMaTP(int maTP)
        {
            //if (THANHPHO_DAO.CheckThanhPhoByMaTP(maTP))
            //{
            //    return null;
            //}
            return THANHPHO_DAO.SelectThanhPhosByAndMaTP(maTP);
        }
        public static int SelectThanhPhoByTen(String tenTP)
        {
            return THANHPHO_DAO.SelectThanhPhoByTen(tenTP);
        }
    }
}
